package com.example.service.impl;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import jdk.internal.org.objectweb.asm.TypeReference;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.stereotype.Service;

import com.example.service.AnalyzeServer;

@Service
@SuppressWarnings("deprecation")
public class AnalyzeServerImpl implements AnalyzeServer {

	@SuppressWarnings("resource")
	@Override
	public List<List<Map<String, Object>>> AnalyzeExcel(String path) throws IOException {

		// 获取文件流
		FileInputStream fileInputStream = new FileInputStream(path);

		// 1.从流中获取工作簿
		Workbook workbook = new XSSFWorkbook(fileInputStream);

		int sheetNum = workbook.getNumberOfSheets();

		List<List<Map<String, Object>>> sheetList = new ArrayList<List<Map<String, Object>>>();

		for (int i = 0; i < sheetNum; i++) {// 页

			Sheet sheet = workbook.getSheetAt(i);

			List<Map<String, Object>> sheetData = new ArrayList<Map<String, Object>>();

			int rsRows = sheet.getPhysicalNumberOfRows(); // 获得此页总行数

			for (int j = 1; j < rsRows; j++) {// 行

				Row row = sheet.getRow(j);
				Map<String, Object> rowMap = new HashMap<String, Object>();

				int columns = sheet.getRow(0).getPhysicalNumberOfCells();// 获得总列数
				for (int l = 0; l < columns; l++) {
					Cell cell = row.getCell(l);
					if (cell != null) {
						if (i == 8) {
							rowMap.put(sheet.getRow(0).getCell(l).getStringCellValue(), cell.getStringCellValue());
						} else {
							rowMap.put(sheet.getRow(0).getCell(l).getStringCellValue(), cell.getStringCellValue());
						}
					}
				}

				sheetData.add(rowMap);

			}

			sheetList.add(sheetData);

		}

		// 文件流关闭
		fileInputStream.close();
		return sheetList;

	}

	/**
	 * 解析物料编码含义
	 */
	@Override
	public String[] AnalyzeMatterCode(String matterCode) throws IOException {

		/**
		 * 可根据编码第一下标元素来决定取那个文档
		 *
		 */

		List<List<Map<String, Object>>> data = this.AnalyzeExcel("F:/test/物料编码表格TEST.xlsx"); // 解析表格 编译次数含义
		String[] paraphrase = new String[data.size()];
		int codeLength = 0; // 用于分段截取 物料编码记录 截取开始下标

		for (int i = 0; i < data.size(); i++) { // 取出页中的数据
			String code = matterCode.substring(codeLength,
					codeLength + data.get(i).get(0).get("编码").toString().length()); // 得出此处页需解析的 编码
			List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();

			for (Map<String, Object> map : data.get(i)) { // 遍历行级数据
				if (code.equals(map.get("编码"))) {
					list.add(map);// 取出 编码相同的行
				}
			}

			if (list.size() != 0) {

				if (list.size() == 1) { // 沒有相同的则直接取第一个

					paraphrase[i] = list.get(0).get("释义").toString();

				} else {// 如有多个相同编码则回去取上次的

					for (Map<String, Object> map : list) {
						if (map.get("上级编码") != null && !map.get("上级编码").toString().equals("")) {
							int fatherCodeLength = map.get("上级编码").toString().length();
							String fatherCode = matterCode.substring(codeLength - fatherCodeLength,
									codeLength + fatherCodeLength);

							if (fatherCode.equals(map.get("上级编码").toString())) {
								paraphrase[i] = map.get("释义").toString();
							}
						}

					}

					if (paraphrase[i] == null) { // 多个相同编码但无法匹配上级编码则取第一个
						paraphrase[i] = list.get(0).get("释义").toString();
					}

				}

			} else {
				paraphrase[i] = "无释义";
			}

			codeLength = codeLength + code.length();
		}

		return paraphrase;
	}

	@SuppressWarnings("resource")
	@Override
	public List<List<Map<String, String>>> AnalyzeExcelAR(String path) throws FileNotFoundException, IOException {
		// 获取文件流
		FileInputStream fileInputStream = new FileInputStream(path);

		// 1.从流中获取工作簿
		Workbook workbook = new XSSFWorkbook(fileInputStream);

		int sheetNum = workbook.getNumberOfSheets();

		List<List<Map<String, String>>> sheetList = new ArrayList<List<Map<String, String>>>();

		for (int i = 0; i < sheetNum; i++) {// 页

			Sheet sheet = workbook.getSheetAt(i);

			List<Map<String, String>> sheetData = new ArrayList<Map<String, String>>();

			int rsRows = sheet.getPhysicalNumberOfRows(); // 获得此页总行数

			for (int j = 3; j < rsRows; j++) {// 行

				Row row = sheet.getRow(j);
				Map<String, String> rowMap = new HashMap<String, String>();
				// 读取物料信息
				Cell projectName = row.getCell(1);
				if (projectName != null) {// 项目名称
					projectName.setCellType(CellType.STRING);
					rowMap.put("projectName", projectName.getRichStringCellValue().toString());

				}

				Cell jobNo = row.getCell(2);
				if (jobNo != null) {// 项目工作号
					jobNo.setCellType(CellType.STRING);
					rowMap.put("jobNo", jobNo.getRichStringCellValue().toString());

				}

				Cell moduleName = row.getCell(3);
				if (moduleName != null) {// 模块名称
					moduleName.setCellType(CellType.STRING);
					rowMap.put("moduleName", moduleName.getRichStringCellValue().toString());

				}

				Cell workPackageNo = row.getCell(4);
				if (workPackageNo != null) {// 模块工作包号
					workPackageNo.setCellType(CellType.STRING);
					rowMap.put("workPackageNo", workPackageNo.getRichStringCellValue().toString());

				}

				Cell equipmentName = row.getCell(5);
				if (equipmentName != null) {// 材料设备名称
					equipmentName.setCellType(CellType.STRING);
					rowMap.put("equipmentName", equipmentName.getRichStringCellValue().toString());
				}

				Cell grade = row.getCell(6);
				if (grade != null) {// 材质
					grade.setCellType(CellType.STRING);
					rowMap.put("grade", grade.getRichStringCellValue().toString());
				}

				Cell levelNo = row.getCell(7);
				if (levelNo != null) {// 层数
					levelNo.setCellType(CellType.STRING);
					rowMap.put("levelNo", levelNo.getRichStringCellValue().toString());
				}

				Cell roomNo = row.getCell(8);
				if (roomNo != null) {// 房间号
					roomNo.setCellType(CellType.STRING);
					rowMap.put("roomNo", roomNo.getRichStringCellValue().toString());
				}

				Cell roomName = row.getCell(9);
				if (roomName != null) {// 房间名
					roomName.setCellType(CellType.STRING);
					rowMap.put("roomName", roomName.getRichStringCellValue().toString());
				}

				Cell location = row.getCell(10);
				if (location != null) {// 位置
					location.setCellType(CellType.STRING);
					rowMap.put("location", location.getRichStringCellValue().toString());
				}

				Cell standard = row.getCell(11);
				if (standard != null) {// 执行标准
					standard.setCellType(CellType.STRING);
					rowMap.put("standard", standard.getRichStringCellValue().toString());
				}

				Cell detailDrawingNo = row.getCell(12);
				if (detailDrawingNo != null) {// 详设图纸编号
					detailDrawingNo.setCellType(CellType.STRING);
					rowMap.put("detailDrawingNo", detailDrawingNo.getRichStringCellValue().toString());
				}

				Cell detailDrawingRev = row.getCell(13);
				if (detailDrawingRev != null) {// 详设图纸版本
					detailDrawingRev.setCellType(CellType.STRING);
					rowMap.put("detailDrawingRev", detailDrawingRev.getRichStringCellValue().toString());
				}

				Cell shopDrawingNo = row.getCell(14);
				if (shopDrawingNo != null) {// 加设图纸编号
					try{
						shopDrawingNo.setCellType(CellType.STRING);
						rowMap.put("shopDrawingNo", shopDrawingNo.getRichStringCellValue().toString().replace(" ", ""));
					}catch (Exception e){
						System.out.println(path + "第几行" + j + "行  加设图纸编号错误");
					}
				}

				Cell shopDrawingRev = row.getCell(15);
				if (shopDrawingRev != null) {// 加设图纸版本
					shopDrawingRev.setCellType(CellType.STRING);
					rowMap.put("shopDrawingRev", shopDrawingRev.getRichStringCellValue().toString());
				}

				Cell equipmentSize1 = row.getCell(16);
				if (equipmentSize1 != null) {// 材料设备尺寸（mm）（长x宽x高）（LxWxH）
					equipmentSize1.setCellType(CellType.STRING);
					rowMap.put("equipmentSize", equipmentSize1.getRichStringCellValue().toString());
				}

				Cell equipmentSize2 = row.getCell(17);
				if (equipmentSize2 != null) {// 材料设备尺寸（mm）（厚度）
					equipmentSize2.setCellType(CellType.STRING);
					rowMap.put("equipmentSize", equipmentSize2.getRichStringCellValue().toString());
				}

				Cell equipmentSize3 = row.getCell(18);
				if (equipmentSize3 != null) {// 材料设备尺寸（mm）（直径）
					equipmentSize3.setCellType(CellType.STRING);
					rowMap.put("equipmentSize", equipmentSize3.getRichStringCellValue().toString());
				}

				Cell materialContainer = row.getCell(19);
				if (materialContainer != null) {// 材料容积
					materialContainer.setCellType(CellType.STRING);
					rowMap.put("materialContainer", materialContainer.getRichStringCellValue().toString());
				}

				Cell desityWeight = row.getCell(20);
				if (desityWeight != null) {// 容重
					desityWeight.setCellType(CellType.STRING);
					rowMap.put("desityWeight", desityWeight.getRichStringCellValue().toString());
				}

				Cell fireRating = row.getCell(21);
				if (fireRating != null) {// 防火级别
					fireRating.setCellType(CellType.STRING);
					rowMap.put("fireRating", fireRating.getRichStringCellValue().toString());
				}

				Cell colour = row.getCell(22);
				if (colour != null) {// 颜色
					colour.setCellType(CellType.STRING);
					rowMap.put("colour", colour.getRichStringCellValue().toString());
				}

				Cell blastCode = row.getCell(23);
				if (blastCode != null) {// 防爆级别
					blastCode.setCellType(CellType.STRING);
					rowMap.put("blastCode", blastCode.getRichStringCellValue().toString());
				}

				Cell noiseCoefficient = row.getCell(24);
				if (noiseCoefficient != null) {// 降噪系数
					noiseCoefficient.setCellType(CellType.STRING);
					rowMap.put("noiseCoefficient", noiseCoefficient.getRichStringCellValue().toString());
				}

				Cell equipmentModel = row.getCell(25);
				if (equipmentModel != null) {// 材料设备型号
					equipmentModel.setCellType(CellType.STRING);
					rowMap.put("equipmentModel", equipmentModel.getRichStringCellValue().toString());
				}

				Cell installationType = row.getCell(26);
				if (installationType != null) {// 连接形式
					installationType.setCellType(CellType.STRING);
					rowMap.put("installationType", installationType.getRichStringCellValue().toString());
				}

				Cell otherRequirement1 = row.getCell(27);
				if (otherRequirement1 != null) {// 其他技术要求1
					otherRequirement1.setCellType(CellType.STRING);
					rowMap.put("otherRequirement", otherRequirement1.getRichStringCellValue().toString());
				}

				Cell otherRequirement2 = row.getCell(28);
				if (otherRequirement2 != null) {// 其他技术要求2
					otherRequirement2.setCellType(CellType.STRING);
					rowMap.put("otherRequirement", otherRequirement2.getRichStringCellValue().toString());
				}

				Cell otherRequirement3 = row.getCell(29);
				if (otherRequirement3 != null) {// 其他技术要求3
					otherRequirement3.setCellType(CellType.STRING);
					rowMap.put("otherRequirement", otherRequirement3.getRichStringCellValue().toString());
				}

				Cell certificateRequirement = row.getCell(30);
				if (certificateRequirement != null) {// 证书要求
					certificateRequirement.setCellType(CellType.STRING);
					rowMap.put("certificateRequirement", certificateRequirement.getRichStringCellValue().toString());
				}

				Cell specialRequirement = row.getCell(31);
				if (specialRequirement != null) {// 特殊要求
					specialRequirement.setCellType(CellType.STRING);
					rowMap.put("specialRequirement", specialRequirement.getRichStringCellValue().toString());
				}

				Cell eExpandedRequirement1 = row.getCell(32);
				if (eExpandedRequirement1 != null) {// 拓展要求
					eExpandedRequirement1.setCellType(CellType.STRING);
					rowMap.put("eExpandedRequirement", eExpandedRequirement1.getRichStringCellValue().toString());
				}

				Cell eExpandedRequirement2 = row.getCell(33);
				if (eExpandedRequirement2 != null) {// 拓展要求
					eExpandedRequirement2.setCellType(CellType.STRING);
					rowMap.put("eExpandedRequirement", eExpandedRequirement2.getRichStringCellValue().toString());
				}

				Cell materialCode = row.getCell(34);
				if (materialCode != null) {// 物料编码
					materialCode.setCellType(CellType.STRING);
					rowMap.put("materialCode", materialCode.getRichStringCellValue().toString());
				}

				Cell tagNo = row.getCell(35);
				if (tagNo != null) {// 位号
					tagNo.setCellType(CellType.STRING);
					rowMap.put("tagNo", tagNo.getRichStringCellValue().toString());
				}

				Cell partNo = row.getCell(36);
				if (partNo != null) {// 零件编号
					partNo.setCellType(CellType.STRING);
					rowMap.put("partNo", partNo.getRichStringCellValue().toString());
				}

				Cell identCode = row.getCell(37);
				if (identCode != null) {// 识别编号
					identCode.setCellType(CellType.STRING);
					rowMap.put("identCode", identCode.getRichStringCellValue().toString());
				}

				Cell clientPartNo = row.getCell(38);
				if (clientPartNo != null) {// 业主零件编号
					clientPartNo.setCellType(CellType.STRING);
					rowMap.put("clientPartNo", clientPartNo.getRichStringCellValue().toString());
				}

				Cell barCodeNo = row.getCell(39);
				if (barCodeNo != null) {// 条形码编号
					barCodeNo.setCellType(CellType.STRING);
					rowMap.put("barCodeNo", barCodeNo.getRichStringCellValue().toString());
				}

				Cell expandedNo = row.getCell(40);
				if (expandedNo != null) {// 拓展编码
					expandedNo.setCellType(CellType.STRING);
					rowMap.put("expandedNo", expandedNo.getRichStringCellValue().toString());
				}

				Cell unit = row.getCell(41);
				if (unit != null) {// 单位
					try{
						unit.setCellType(CellType.STRING);
						rowMap.put("unit", unit.getRichStringCellValue().toString().toUpperCase());
					}catch (Exception e){
						System.out.println(path + "第几行" + j + "行  单位错误");
					}

				}

				Cell netAmount = row.getCell(42);
				if (netAmount != null) {// 净量
					netAmount.setCellType(CellType.STRING);
					rowMap.put("netAmount", netAmount.getRichStringCellValue().toString());
				}

				Cell surplus = row.getCell(43);
				if (surplus != null) {// 余量
					surplus.setCellType(CellType.STRING);
					rowMap.put("surplus", surplus.getRichStringCellValue().toString());
				}

				Cell qTY = row.getCell(44);
				if (qTY != null) {// 总量
					try{
						qTY.setCellType(CellType.STRING);
						rowMap.put("qty", qTY.getRichStringCellValue().toString());
					}catch (Exception e){
						System.out.println(path + "第几行" + j + "行  总量错误");
					}
				}

				Cell unitWeight = row.getCell(45);
				if (unitWeight != null) {// 单重
					unitWeight.setCellType(CellType.STRING);
					rowMap.put("unitWeight", unitWeight.getRichStringCellValue().toString());
				}

				Cell totalWeight = row.getCell(46);
				if (totalWeight != null) {// 总重
					try {
						totalWeight.setCellType(CellType.STRING);
						rowMap.put("totalWeight", totalWeight.getRichStringCellValue().toString());
 					}catch (Exception e) {
						System.err.println(path + "第几行" + j + "行  总重错误");
					}

				}

				Cell surfaceTreatment = row.getCell(47);
				if (surfaceTreatment != null) {// 表面处理
					surfaceTreatment.setCellType(CellType.STRING);
					rowMap.put("surfaceTreatment", surfaceTreatment.getRichStringCellValue().toString());
				}

				Cell coatingSystem = row.getCell(48);
				if (coatingSystem != null) {// 油漆配套
					coatingSystem.setCellType(CellType.STRING);
					rowMap.put("coatingSystem", coatingSystem.getRichStringCellValue().toString());
				}

				Cell coatingArea = row.getCell(49);
				if (coatingArea != null) {// 油漆面积
					coatingArea.setCellType(CellType.STRING);
					rowMap.put("coatingArea", coatingArea.getRichStringCellValue().toString());
				}

				Cell coatingColor = row.getCell(50);
				if (coatingColor != null) {// 油漆颜色
					coatingColor.setCellType(CellType.STRING);
					rowMap.put("coatingColor", coatingColor.getRichStringCellValue().toString());
				}

				Cell supplyBy = row.getCell(51);
				if (supplyBy != null) {// 供货方
					supplyBy.setCellType(CellType.STRING);
					rowMap.put("supplyBy", supplyBy.getRichStringCellValue().toString());
				}

				Cell mTONo = row.getCell(52);
				if (mTONo != null) {// 料单编号
					mTONo.setCellType(CellType.STRING);
					rowMap.put("mTONo", mTONo.getRichStringCellValue().toString());
				}

				Cell itemNoinMTO = row.getCell(53);
				if (itemNoinMTO != null) {// 料单中序号
					itemNoinMTO.setCellType(CellType.STRING);
					rowMap.put("itemNoinMTO", itemNoinMTO.getRichStringCellValue().toString());
				}

				Cell payItemNo = row.getCell(54);
				if (payItemNo != null) {// 业主付款编号
					payItemNo.setCellType(CellType.STRING);
					rowMap.put("payItemNo", payItemNo.getRichStringCellValue().toString());
				}

				Cell materialAddedbyDrawingUpdate = row.getCell(55);
				if (materialAddedbyDrawingUpdate != null) {// 材料是否因升版增加
					materialAddedbyDrawingUpdate.setCellType(CellType.STRING);
					rowMap.put("materialAddedbyDrawingUpdate", materialAddedbyDrawingUpdate.getRichStringCellValue().toString());
				}

				Cell materialWastedbyDrawingUpdate = row.getCell(56);
				if (materialWastedbyDrawingUpdate != null) {// 材料是否因升版作废
					materialWastedbyDrawingUpdate.setCellType(CellType.STRING);
					rowMap.put("materialWastedbyDrawingUpdate", materialWastedbyDrawingUpdate.getRichStringCellValue().toString());
				}

				Cell remark = row.getCell(57);
				if (remark != null) {
					remark.setCellType(CellType.STRING);
					rowMap.put("remark", remark.getRichStringCellValue().toString());
				}

				Cell materialCoding = row.getCell(58);
				if (materialCoding != null) {//旧物资编码
					materialCoding.setCellType(CellType.STRING);
					rowMap.put("materialCoding", materialCoding.getRichStringCellValue().toString());
				}

				sheetData.add(rowMap);

			}

			sheetList.add(sheetData);

		}

		// 文件流关闭
		fileInputStream.close();
		return sheetList;
	}

	@Override
	public List<List<Map<String, String>>> AnalyzeExcelHVAC(String path) throws FileNotFoundException, IOException {
		// 获取文件流
		FileInputStream fileInputStream = new FileInputStream(path);

		// 1.从流中获取工作簿
		@SuppressWarnings("resource")
		Workbook workbook = new XSSFWorkbook(fileInputStream);

		int sheetNum = workbook.getNumberOfSheets();

		List<List<Map<String, String>>> sheetList = new ArrayList<List<Map<String, String>>>();

		for (int i = 0; i < sheetNum; i++) {// 页

			Sheet sheet = workbook.getSheetAt(i);

			List<Map<String, String>> sheetData = new ArrayList<Map<String, String>>();

			int rsRows = sheet.getPhysicalNumberOfRows(); // 获得此页总行数

			for (int j = 2; j < rsRows; j++) {// 行

				Row row = sheet.getRow(j);
				Map<String, String> rowMap = new HashMap<String, String>();
				// 读取物料信息
				Cell gradeCell = row.getCell(8);
				if (gradeCell != null) {// 材质
					gradeCell.setCellType(CellType.STRING);
					rowMap.put("grade", gradeCell.getRichStringCellValue().toString());

				}
				Cell materialCodecell = row.getCell(12);
				if (materialCodecell != null) {// 物料编码
					rowMap.put("materialCode", materialCodecell.getRichStringCellValue().toString());
				}

				Cell materialCodecell2 = row.getCell(48);
				if (materialCodecell2 != null) {// 物料编码
					rowMap.put("materialCode2", materialCodecell2.getRichStringCellValue().toString());
				}

				Cell unitCell = row.getCell(37); // 计量单位
				if (unitCell != null) {// 计量单位
					rowMap.put("unit", unitCell.getRichStringCellValue().toString().toUpperCase());
				}
				// 读取图纸
				Cell ShopDrawingNo = row.getCell(7); // 图纸编码
				if (ShopDrawingNo != null) {// 图纸编码
					// 设置单元格类型
					if (!ShopDrawingNo.getRichStringCellValue().toString().toUpperCase().equals("NA")
							&& !ShopDrawingNo.getRichStringCellValue().toString().equals("")) {

						rowMap.put("shopDrawingNo", ShopDrawingNo.getRichStringCellValue().toString().replace(" ", ""));

						Cell ShopDrawingRev = row.getCell(8); // 图纸版本
						if (ShopDrawingRev != null) {// 图纸版本
							ShopDrawingRev.setCellType(CellType.STRING);
							rowMap.put("shopDrawingRev", ShopDrawingRev.getRichStringCellValue().toString().replace(" ", ""));
						}
						Cell WorkPackageNo = row.getCell(4); // 模块工作包号
						if (WorkPackageNo != null) {// 模块工作包号
							rowMap.put("workPackageNo", WorkPackageNo.getRichStringCellValue().toString().replace(" ", ""));
						}
						Cell ProjectName = row.getCell(1); // ProjectName
						if (WorkPackageNo != null) {// ProjectName
							rowMap.put("projectName", ProjectName.getRichStringCellValue().toString().replace(" ", ""));
						}
						Cell JobNo = row.getCell(2); // jobNo 项目工作号
						if (JobNo != null) {// jobNo 项目工作号
							rowMap.put("jobNo", JobNo.getRichStringCellValue().toString().replace(" ", ""));
						}
						Cell ModuleName = row.getCell(3); // ModuleName模块名称
						if (ModuleName != null) {// ProjectName
							rowMap.put("moduleName", ModuleName.getRichStringCellValue().toString().replace(" ", ""));
						}

					}
				}
				if (!"".toString().equals(rowMap.get("materialCode")) && rowMap.get("materialCode") != null) {
					sheetData.add(rowMap);
				}

			}

			sheetList.add(sheetData);

		}

		// 文件流关闭
		fileInputStream.close();
		return sheetList;
	}

	@SuppressWarnings("resource")
	@Override
	public List<List<Map<String, String>>> AnalyzeExcelST(String path) throws FileNotFoundException, IOException {
		// 获取文件流
		FileInputStream fileInputStream = new FileInputStream(path);

		// 1.从流中获取工作簿
		Workbook workbook = new XSSFWorkbook(fileInputStream);


		List<List<Map<String, String>>> sheetList = new ArrayList<List<Map<String, String>>>();


		Sheet sheet = workbook.getSheetAt(0);

		List<Map<String, String>> sheetData = new ArrayList<Map<String, String>>();

		int rsRows = sheet.getPhysicalNumberOfRows(); // 获得此页总行数

		for (int j = 2; j < rsRows; j++) {// 行

			Row row = sheet.getRow(j);
			Map<String, String> rowMap = new HashMap<String, String>();
			// 读取物料信息

			Cell ProjectName = row.getCell(1); // ProjectName
			if (ProjectName != null) {// ProjectName
				ProjectName.setCellType(CellType.STRING);
				rowMap.put("projectName", ProjectName.getRichStringCellValue().toString().replace(" ", ""));
			}
			Cell JobNo = row.getCell(2); // jobNo 项目工作号
			if (JobNo != null) {// jobNo 项目工作号
				JobNo.setCellType(CellType.STRING);
				rowMap.put("jobNo", JobNo.getRichStringCellValue().toString().replace(" ", ""));
			}
			Cell ModuleName = row.getCell(3); // ModuleName模块名称
			if (ModuleName != null) {// ProjectName
				ModuleName.setCellType(CellType.STRING);
				rowMap.put("moduleName", ModuleName.getRichStringCellValue().toString().replace(" ", ""));
			}

			// 读取图纸
			Cell ShopDrawingNo = row.getCell(6); // 图纸编码
			if (ShopDrawingNo != null) {// 图纸编码
				// 设置单元格类型
				ShopDrawingNo.setCellType(CellType.STRING);
				if (!ShopDrawingNo.getRichStringCellValue().toString().toUpperCase().equals("NA")
						&& !ShopDrawingNo.getRichStringCellValue().toString().equals("")
						&& ShopDrawingNo.toString().length() > 13) {
					rowMap.put("shopDrawingNo", ShopDrawingNo.getRichStringCellValue().toString().replace(" ", ""));

				}
			}

			Cell ShopDrawingRev = row.getCell(7); // 图纸版本
			if (ShopDrawingRev != null) {// 图纸版本
				ShopDrawingRev.setCellType(CellType.STRING);
				rowMap.put("shopDrawingRev", ShopDrawingRev.getRichStringCellValue().toString());
			}

			try {
				Cell partNo = row.getCell(8); // 零件编码
				if (partNo != null) {// 零件编码
					partNo.setCellType(CellType.STRING);
					rowMap.put("partNo", partNo.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 零件编码错误");
			}
			try {
				Cell partGUIDNo = row.getCell(9); // 零件编码
				if (partGUIDNo != null) {// 零件编码
					partGUIDNo.setCellType(CellType.STRING);
					rowMap.put("partGUIDNo", partGUIDNo.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 零件编码错误");
			}

			try {
				Cell partName = row.getCell(10); // 零件名称
				if (partName != null) {// 零件名称
					partName.setCellType(CellType.STRING);
					rowMap.put("partName", partName.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 零件名称	错误");
			}
			try {
				Cell steelType = row.getCell(11); // 零件类型
				if (steelType != null) {// 零件类型
					steelType.setCellType(CellType.STRING);
					rowMap.put("steelType", steelType.getRichStringCellValue().toString().replace(" ", ""));
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 零件类型	错误");
			}
			try {
				Cell StructureType = row.getCell(12); // 零件结构类型
				if (StructureType != null) {// 零件结构类型
					StructureType.setCellType(CellType.STRING);
					rowMap.put("structureType", StructureType.getRichStringCellValue().toString().replace(" ", ""));
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 零件结构类型	错误");
			}

			try {
				Cell AreaOfPart = row.getCell(13); // 零件区域
				if (AreaOfPart != null) {// 零件区域
					AreaOfPart.setCellType(CellType.STRING);
					rowMap.put("areaOfPart", AreaOfPart.getRichStringCellValue().toString().replace(" ", ""));
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 零件区域	错误");
			}
			try {
				Cell levelNo = row.getCell(14); // 零件层数
				if (levelNo != null) {// 零件层数
					levelNo.setCellType(CellType.STRING);
					rowMap.put("levelNo", levelNo.getRichStringCellValue().toString().replace(" ", ""));
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 零件层数	错误");
			}
			Cell WorkPackageNo = row.getCell(15); // 模块工作包号
			if (WorkPackageNo != null) {// 模块工作包号
				WorkPackageNo.setCellType(CellType.STRING);
				rowMap.put("workPackageNo", WorkPackageNo.getRichStringCellValue().toString());
			}

			try {
				Cell partProfileName = row.getCell(16); // 零件规格名称
				if (partProfileName != null) {// 零件规格名称
					partProfileName.setCellType(CellType.STRING);
					rowMap.put("partProfileName", partProfileName.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 零件规格	错误");
			}
			try {
				Cell partProfile = row.getCell(17); // 零件规格
				if (partProfile != null) {// 零件规格
					partProfile.setCellType(CellType.STRING);
					rowMap.put("partProfile", partProfile.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
			}

			Cell gradeCell = row.getCell(18);
			if (gradeCell != null) {// 材质
				rowMap.put("grade", gradeCell.getRichStringCellValue().toString());

			}
			Cell qty = row.getCell(19);
			if (qty != null) {// 数量
				qty.setCellType(CellType.STRING);
				rowMap.put("qty", qty.getRichStringCellValue().toString());

			}
			Cell unitCell = row.getCell(20); // 计量单位
			if (unitCell != null) {// 计量单位
				rowMap.put("unit", unitCell.getRichStringCellValue().toString().toUpperCase());
			}

			Cell unitWeight = row.getCell(23); // 零件单重量
			if (unitWeight != null) {// 零件单重量
				unitWeight.setCellType(CellType.STRING);
				rowMap.put("unitWeight", unitWeight.getRichStringCellValue().toString().toUpperCase());
			}
			Cell netSingleWeight = row.getCell(24); // 零件单净重
			if (netSingleWeight != null) {// 零件单净重
				netSingleWeight.setCellType(CellType.STRING);
				rowMap.put("netSingleWeight", netSingleWeight.getRichStringCellValue().toString().toUpperCase());
			}
			Cell netTotalWeight = row.getCell(25); // 零件总净重
			if (netTotalWeight != null) {// 零件总净重
				netTotalWeight.setCellType(CellType.STRING);
				rowMap.put("netSingleWeight", netTotalWeight.getRichStringCellValue().toString().toUpperCase());
			}
			Cell grossSingleWeight = row.getCell(26); // 零件单毛重
			if (grossSingleWeight != null) {// 零件单毛重
				grossSingleWeight.setCellType(CellType.STRING);
				rowMap.put("grossSingleWeight", grossSingleWeight.getRichStringCellValue().toString().toUpperCase());
			}
			Cell grossTotalWeight = row.getCell(27); // 零件总毛重
			if (grossTotalWeight != null) {// 零件总毛重
				grossTotalWeight.setCellType(CellType.STRING);
				rowMap.put("grossTotalWeight", grossTotalWeight.getRichStringCellValue().toString().toUpperCase());
			}
			Cell netArea = row.getCell(28); // 零件净表面积
			if (netArea != null) {// 零件净表面积
				netArea.setCellType(CellType.STRING);
				rowMap.put("netArea", netArea.getRichStringCellValue().toString().toUpperCase());
			}

			Cell MTONo = row.getCell(54);
			if (MTONo != null) {// Mto编码
				MTONo.setCellType(CellType.STRING);
				rowMap.put("MTONo", MTONo.getRichStringCellValue().toString());
			}

			Cell materialCodecell = row.getCell(52);
			if (materialCodecell != null) {// 物料编码18位
				materialCodecell.setCellType(CellType.STRING);
				rowMap.put("materialCode", materialCodecell.getRichStringCellValue().toString());
			}

			Cell bulkMaterialNo = row.getCell(50);
			if (bulkMaterialNo != null) {// 物料 MTO 流水号
				bulkMaterialNo.setCellType(CellType.STRING);
				rowMap.put("bulkMaterialNo", bulkMaterialNo.getRichStringCellValue().toString());
			}
			Cell NestingDrawingNo = row.getCell(47); // 套料图纸编号
			if (NestingDrawingNo != null) {// 套料图纸版本
				NestingDrawingNo.setCellType(CellType.STRING);
				if (NestingDrawingNo.getStringCellValue().length() > 13) {
					rowMap.put("nestingDrawingNo", NestingDrawingNo.getRichStringCellValue().toString());

					Cell NestingDrawingRev = row.getCell(48); // 套料图纸版本
					if (NestingDrawingRev != null) {
						NestingDrawingRev.setCellType(CellType.STRING);
						rowMap.put("nestingDrawingRev", NestingDrawingRev.getRichStringCellValue().toString());
					}
				}
			}

			Cell remnantPartNo = row.getCell(51); // 余料编码
			if (remnantPartNo != null) {// 余料编码
				remnantPartNo.setCellType(CellType.STRING);
				rowMap.put("remnantPartNo", remnantPartNo.getRichStringCellValue().toString().toUpperCase());
			}

			Cell assemblyFabricationDetailNo = row.getCell(59); // 构件编码
			if (assemblyFabricationDetailNo != null) {// 构件编码
				assemblyFabricationDetailNo.setCellType(CellType.STRING);
				rowMap.put("assemblyFabricationDetailNo",
						assemblyFabricationDetailNo.getRichStringCellValue().toString().toUpperCase());
			}

			Cell materialCodecell2 = row.getCell(60);
			if (materialCodecell2 != null) {// 物料编码16位
				rowMap.put("materialCode2", materialCodecell2.getRichStringCellValue().toString());
			}

			Cell EquipmentTagNo = row.getCell(61);
			if (EquipmentTagNo != null) {// 设备编码
				rowMap.put("EquipmentTagNo", EquipmentTagNo.getRichStringCellValue().toString());
			}
			sheetData.add(rowMap);

		}

		sheetList.add(sheetData);


		// 文件流关闭
		fileInputStream.close();
		return sheetList;
	}

	/**
	 * 结构专业解析焊口信息
	 */
	@SuppressWarnings("resource")
	public List<Map<String, String>> AnalyzeWeldersListforStructureExcelST(String path) throws IOException {

		// 获取文件流
		FileInputStream fileInputStream = new FileInputStream(path);

		// 1.从流中获取工作簿
		@SuppressWarnings("resource")
		Workbook workbook = new XSSFWorkbook(fileInputStream);

		Sheet sheet = workbook.getSheetAt(0);

		List<Map<String, String>> sheetData = new ArrayList<Map<String, String>>();

		int rsRows = sheet.getPhysicalNumberOfRows(); // 获得此页总行数

		for (int j = 2; j < rsRows; j++) {// 行
			Row row = sheet.getRow(j);
			Map<String, String> rowMap = new HashMap<String, String>();
			// 读取物料信息
			Cell JobNo = row.getCell(2); // 项目名称
			if (JobNo != null) {// 项目名称
				JobNo.setCellType(CellType.STRING);
				rowMap.put("JobNo", JobNo.getRichStringCellValue().toString().toUpperCase());
			}
			Cell ModuleName = row.getCell(3); // ModuleName模块名称
			if (ModuleName != null) {// ModuleName模块名称
				ModuleName.setCellType(CellType.STRING);
				rowMap.put("ModuleName", ModuleName.getRichStringCellValue().toString().toUpperCase());
			}

			Cell DrawingRev = row.getCell(5); // DrawingRev图纸版本
			if (DrawingRev != null) {// DrawingRev图纸版本
				DrawingRev.setCellType(CellType.STRING);
				rowMap.put("DrawingRev", DrawingRev.getRichStringCellValue().toString().toUpperCase());
			}
			Cell AssemblyNo = row.getCell(6); // AssemblyNo 构件编号
			if (AssemblyNo != null) {// AssemblyNo 构件图纸编号
				AssemblyNo.setCellType(CellType.STRING);
				if (!AssemblyNo.equals("NA")) {
					rowMap.put("AssemblyNo",
							AssemblyNo.getRichStringCellValue().toString().toUpperCase().replace(" ", ""));
				}
			}
			Cell WeldNo = row.getCell(8); // WeldNo焊接编号
			if (WeldNo != null) {// WeldNo焊接编号
				WeldNo.setCellType(CellType.STRING);
				rowMap.put("WeldNo", WeldNo.getRichStringCellValue().toString().toUpperCase());
			}
//			Cell UT = row.getCell(8); // UT
//			if (UT != null) {// UT
//				UT.setCellType(CellType.STRING);
//				rowMap.put("UT", UT.getRichStringCellValue().toString().toUpperCase());
//			}
//
//			Cell MT = row.getCell(9); // MT
//			if (MT != null) {// UT
//				MT.setCellType(CellType.STRING);
//				rowMap.put("MT", MT.getRichStringCellValue().toString().toUpperCase());
//			}
//			Cell RT = row.getCell(10); // RT
//			if (RT != null) {// RT
//				RT.setCellType(CellType.STRING);
//				rowMap.put("RT", RT.getRichStringCellValue().toString().toUpperCase());
//			}
			Cell WeldQTY = row.getCell(9); // RWeldQTYT 焊缝数量
			if (WeldQTY != null) {// WeldQTY 焊缝数量
				WeldQTY.setCellType(CellType.STRING);
				rowMap.put("WeldQTY", WeldQTY.getRichStringCellValue().toString().toUpperCase());
			}

			Cell WeldLength = row.getCell(10); // WeldLength焊缝长度
			if (WeldLength != null) {// WeldLength焊缝长度
				WeldLength.setCellType(CellType.STRING);
				rowMap.put("WeldLength", WeldLength.getRichStringCellValue().toString().toUpperCase());
			}
			Cell abovelineSize = row.getCell(11); // AbovelineSize 焊缝线上尺寸
			if (abovelineSize != null) {// AbovelineSize 焊缝线上尺寸
				abovelineSize.setCellType(CellType.STRING);
				rowMap.put("AbovelineSize", abovelineSize.getRichStringCellValue().toString().toUpperCase());
			}

			Cell BelowlineSize = row.getCell(12); // BelowlineSize焊缝线下尺寸
			if (BelowlineSize != null) {// BelowlineSize焊缝线下尺寸
				BelowlineSize.setCellType(CellType.STRING);
				rowMap.put("BelowlineSize", BelowlineSize.getRichStringCellValue().toString().toUpperCase());
			}
			Cell AbovelineType = row.getCell(13);
			if (AbovelineType != null) {// AbovelineType焊缝线上类型
				AbovelineType.setCellType(CellType.STRING);
				rowMap.put("AbovelineType", AbovelineType.getRichStringCellValue().toString());
			}
			Cell BelowlineType = row.getCell(14); // BelowlineType焊缝线下类型
			if (BelowlineType != null) {// BelowlineType焊缝线下类型
				BelowlineType.setCellType(CellType.STRING);
				rowMap.put("BelowlineType", BelowlineType.getRichStringCellValue().toString());
			}
			Cell BbovelineTreatment = row.getCell(15); // BbovelineTreatment线上焊缝焊后处理
			if (BbovelineTreatment != null) {// BbovelineTreatment线上焊缝焊后处理
				BbovelineTreatment.setCellType(CellType.STRING);
				rowMap.put("BbovelineTreatment", BbovelineTreatment.getRichStringCellValue().toString().toUpperCase());
			}

			Cell BelowlineTreatment = row.getCell(16); // BelowlineTreatment线下焊缝焊后处理
			if (BelowlineTreatment != null) {// BelowlineTreatment线下焊缝焊后处理
				BelowlineTreatment.setCellType(CellType.STRING);
				rowMap.put("BelowlineTreatment", BelowlineTreatment.getRichStringCellValue().toString().toUpperCase());
			}

			Cell ConnectionMainPartNo = row.getCell(17); // ConnectionMainPartNo连接主零件编号
			if (ConnectionMainPartNo != null) {// ConnectionMainPartNo连接主零件编号
				ConnectionMainPartNo.setCellType(CellType.STRING);
				rowMap.put("ConnectionMainPartNo",
						ConnectionMainPartNo.getRichStringCellValue().toString().toUpperCase());
			}

			Cell ConnectionSecondaryPartNo = row.getCell(18); // ConnectionSecondaryPartNo连接次零件编号
			if (ConnectionSecondaryPartNo != null) {// ConnectionSecondaryPartNo连接次零件编号
				ConnectionSecondaryPartNo.setCellType(CellType.STRING);
				rowMap.put("ConnectionSecondaryPartNo",
						ConnectionSecondaryPartNo.getRichStringCellValue().toString().toUpperCase());
			}
			Cell MainPartProfile = row.getCell(19); // MainPartProfile主零件截面
			if (MainPartProfile != null) {// MainPartProfile主零件截面
				MainPartProfile.setCellType(CellType.STRING);
				rowMap.put("MainPartProfile", MainPartProfile.getRichStringCellValue().toString().toUpperCase());
			}

			Cell MainPartLength = row.getCell(20); // MainPartLength主零件长度
			if (MainPartLength != null) {// MainPartLength主零件长度
				MainPartLength.setCellType(CellType.STRING);
				rowMap.put("MainPartLength", MainPartLength.getRichStringCellValue().toString().toUpperCase());
			}

			Cell MainPartGrade = row.getCell(21); // MainPartGrade主零件材质
			if (MainPartGrade != null) {// MainPartGrade主零件材质
				MainPartGrade.setCellType(CellType.STRING);
				rowMap.put("MainPartGrade", MainPartGrade.getRichStringCellValue().toString().toUpperCase());
			}

			Cell MainPartWeight = row.getCell(22); // MainPartWeight主零件重量
			if (MainPartWeight != null) {// MainPartWeight主零件重量
				MainPartWeight.setCellType(CellType.STRING);
				rowMap.put("MainPartWeight", MainPartWeight.getRichStringCellValue().toString().toUpperCase());
			}

			Cell SecondaryPartProfile = row.getCell(23); // SecondaryPartProfile次零件截面
			if (SecondaryPartProfile != null) {// SecondaryPartProfile次零件截面
				SecondaryPartProfile.setCellType(CellType.STRING);
				rowMap.put("SecondaryPartProfile",
						SecondaryPartProfile.getRichStringCellValue().toString().toUpperCase());
			}

			Cell SecondaryPartLength = row.getCell(24); // SecondaryPartLength次零件长度
			if (SecondaryPartLength != null) {// SecondaryPartLength次零件长度
				SecondaryPartLength.setCellType(CellType.STRING);
				rowMap.put("SecondaryPartLength",
						SecondaryPartLength.getRichStringCellValue().toString().toUpperCase());
			}

			Cell SecondaryPartGrade = row.getCell(25); // SecondaryPartGrade次零件材质
			if (SecondaryPartGrade != null) {// SecondaryPartGrade次零件材质
				SecondaryPartGrade.setCellType(CellType.STRING);
				rowMap.put("SecondaryPartGrade", SecondaryPartGrade.getRichStringCellValue().toString().toUpperCase());
			}
			Cell SecondaryPartWeight = row.getCell(26); // SecondaryPartWeight次零件重量
			if (SecondaryPartWeight != null) {
				SecondaryPartWeight.setCellType(CellType.STRING);
				rowMap.put("SecondaryPartWeight",
						SecondaryPartWeight.getRichStringCellValue().toString().toUpperCase());
			}
			Cell WeldPositionE = row.getCell(27); // WeldPositionE焊缝E坐标
			if (WeldPositionE != null) {
				WeldPositionE.setCellType(CellType.STRING);
				rowMap.put("WeldPositionE", WeldPositionE.getRichStringCellValue().toString().toUpperCase());
			}

			Cell WeldPositionN = row.getCell(28); // WeldPositionN焊缝N坐标
			if (WeldPositionN != null) {
				WeldPositionN.setCellType(CellType.STRING);
				rowMap.put("WeldPositionN", WeldPositionN.getRichStringCellValue().toString().toUpperCase());
			}

			Cell WeldPositionEL = row.getCell(29); // WeldPositionEL焊缝EL坐标
			if (WeldPositionEL != null) {
				WeldPositionEL.setCellType(CellType.STRING);
				rowMap.put("WeldPositionEL", WeldPositionEL.getRichStringCellValue().toString().toUpperCase());
			}

			Cell WeldGuid = row.getCell(30); // WeldGuid焊缝标识
			if (WeldGuid != null) {
				WeldGuid.setCellType(CellType.STRING);
				rowMap.put("WeldGuid", WeldGuid.getRichStringCellValue().toString().toUpperCase());
			}

			Cell ReportTime = row.getCell(31); // ReportTime报告创建时间
			if (ReportTime != null) {
				ReportTime.setCellType(CellType.STRING);
				rowMap.put("ReportTime", ReportTime.getRichStringCellValue().toString().toUpperCase());
			}

			Cell SpliceWeldComments = row.getCell(32); // SpliceWeldComments接口焊缝评注
			if (SpliceWeldComments != null) {
				SpliceWeldComments.setCellType(CellType.STRING);
				rowMap.put("SpliceWeldComments", SpliceWeldComments.getRichStringCellValue().toString().toUpperCase());
			}

			Cell Remark = row.getCell(33); // Remark备注
			if (Remark != null) {
				Remark.setCellType(CellType.STRING);
				rowMap.put("Remark", Remark.getRichStringCellValue().toString().toUpperCase());
			}

			Cell MainPartName = row.getCell(34); // MainPartName主零件名称
			if (MainPartName != null) {
				MainPartName.setCellType(CellType.STRING);
				rowMap.put("MainPartName", MainPartName.getRichStringCellValue().toString().toUpperCase());
			}

			Cell SecondaryPartName = row.getCell(35); // SecondaryPartName次零件名称
			if (SecondaryPartName != null) {
				SecondaryPartName.setCellType(CellType.STRING);
				rowMap.put("SecondaryPartName", SecondaryPartName.getRichStringCellValue().toString().toUpperCase());
			}

			Cell WeldingComments = row.getCell(36); // WeldingComments 焊接评注
			if (WeldingComments != null) {
				WeldingComments.setCellType(CellType.STRING);
				rowMap.put("WeldingComments", WeldingComments.getRichStringCellValue().toString().toUpperCase());
			}
			
			if (AssemblyNo != null && DrawingRev != null && WeldNo != null) {
				if (!AssemblyNo.equals("NA")) {
					sheetData.add(rowMap);
				}
			}

		}

		return sheetData;

	}

	@Override
	public List<List<Map<String, String>>> AnalyzeExcelEI(String path) throws FileNotFoundException, IOException {
		// 获取文件流
		FileInputStream fileInputStream = new FileInputStream(path);

		// 1.从流中获取工作簿
		@SuppressWarnings("resource")
		Workbook workbook = new XSSFWorkbook(fileInputStream);

		// int sheetNum = workbook.getNumberOfSheets();

		List<List<Map<String, String>>> sheetList = new ArrayList<List<Map<String, String>>>();

		// for (int i = 0; i < sheetNum; i++) {// 页

		Sheet sheet = workbook.getSheetAt(0);

		List<Map<String, String>> sheetData = new ArrayList<Map<String, String>>();

		int rsRows = sheet.getPhysicalNumberOfRows(); // 获得此页总行数

		for (int j = 4; j < rsRows; j++) {// 行

			Row row = sheet.getRow(j);
			Map<String, String> rowMap = new HashMap<String, String>();
			// 读取物料信息

			Cell gradeCell = row.getCell(30);
			if (gradeCell != null) {// 材质
				rowMap.put("grade", gradeCell.getRichStringCellValue().toString());

			}

			Cell materialCodecell = row.getCell(14);
			if (materialCodecell != null) {// 物料编码18位
				rowMap.put("materialCode", materialCodecell.getRichStringCellValue().toString());
			}
			Cell materialCodecell2 = row.getCell(78);
			if (materialCodecell2 != null) {// 物料编码16位
				materialCodecell2.setCellType(CellType.STRING);
				rowMap.put("materialCode2", materialCodecell2.getRichStringCellValue().toString());
			}

			Cell unitCell = row.getCell(34); // 计量单位
			if (unitCell != null) {// 计量单位
				rowMap.put("unit", unitCell.getRichStringCellValue().toString().toUpperCase());
			}

			Cell partNo = row.getCell(15); // 零件编码
			if (partNo != null) {// 零件编码
				rowMap.put("partNo", partNo.getRichStringCellValue().toString().toUpperCase());
			}
			// Cell steelType = row.getCell(11); // 零件类型
			// if (steelType != null) {// 零件类型
			// steelType.setCellType(CellType.STRING);
			// rowMap.put("steelType",
			// steelType.getRichStringCellValue().toString().toUpperCase());
			// }
			Cell partName = row.getCell(16); // 零件名称
			if (partName != null) {// 零件名称
				partName.setCellType(CellType.STRING);
				rowMap.put("partName", partName.getRichStringCellValue().toString().replace(" ", ""));
			}
			Cell partProfile = row.getCell(21); // 零件规格
			if (partProfile != null) {// 零件规格
				partProfile.setCellType(CellType.STRING);
				rowMap.put("partProfile", partProfile.getRichStringCellValue().toString().toUpperCase());
			}

			// Cell remnantPartNo = row.getCell(51); // 余料编码
			// if (remnantPartNo != null) {// 余料编码
			// remnantPartNo.setCellType(CellType.STRING);
			// rowMap.put("remnantPartNo",
			// remnantPartNo.getRichStringCellValue().toString().toUpperCase());
			// }

			Cell assemblyFabricationDetailNo = row.getCell(15); // 构件编码
			if (assemblyFabricationDetailNo != null) {// 构件编码
				String[] nos = assemblyFabricationDetailNo.getRichStringCellValue().toString().toUpperCase().split("-");
				String no = new String();
				for (int i = 0; i < nos.length - 1; i++) {
					if (i == 0) {
						no = no + nos[i];
					} else {
						no = no + "-" + nos[i];
					}
				}
				rowMap.put("assemblyFabricationDetailNo", no);
			}

			// 读取图纸
			Cell ShopDrawingNo = row.getCell(7); // 图纸编码
			if (ShopDrawingNo != null) {// 图纸编码
				// 设置单元格类型
				if (!ShopDrawingNo.getRichStringCellValue().toString().toUpperCase().equals("NA")
						&& !ShopDrawingNo.getRichStringCellValue().toString().equals("")) {

					rowMap.put("shopDrawingNo", ShopDrawingNo.getRichStringCellValue().toString().replace(" ", ""));

					Cell ShopDrawingRev = row.getCell(8); // 图纸版本
					if (ShopDrawingRev != null) {// 图纸版本
						ShopDrawingRev.setCellType(CellType.STRING);
						rowMap.put("shopDrawingRev", ShopDrawingRev.getRichStringCellValue().toString());
					}

					Cell WorkPackageNo = row.getCell(4); // 模块工作包号
					if (WorkPackageNo != null) {// 模块工作包号
						if (!WorkPackageNo.getRichStringCellValue().toString().equals("NA"))
							rowMap.put("workPackageNo", WorkPackageNo.getRichStringCellValue().toString());
					}
					Cell ProjectName = row.getCell(1); // ProjectName
					if (WorkPackageNo != null) {// ProjectName
						rowMap.put("projectName", ProjectName.getRichStringCellValue().toString().replace(" ", ""));
					}
					Cell JobNo = row.getCell(2); // jobNo 项目工作号
					if (JobNo != null) {// jobNo 项目工作号
						rowMap.put("jobNo", JobNo.getRichStringCellValue().toString().replace(" ", ""));
					}
					Cell ModuleName = row.getCell(3); // ModuleName模块名称
					if (ModuleName != null) {// ModuleName模块名称
						rowMap.put("moduleName", ModuleName.getRichStringCellValue().toString().replace(" ", ""));
					}

				}
			}
			sheetData.add(rowMap);

		}

		sheetList.add(sheetData);

		// }

		// 文件流关闭
		fileInputStream.close();
		return sheetList;
	}

	/**
	 * 解析管线专业物料追踪表
	 */
	@Override
	@SuppressWarnings("resource")
	public List<List<Map<String, String>>> AnalyzeExcelPI(String path) throws FileNotFoundException, IOException {
		// 获取文件流
		FileInputStream fileInputStream = new FileInputStream(path);

		// 1.从流中获取工作簿

		Workbook workbook = new XSSFWorkbook(fileInputStream);

		// int sheetNum = workbook.getNumberOfSheets();

		List<List<Map<String, String>>> sheetList = new ArrayList<List<Map<String, String>>>();

		// for (int i = 0; i < sheetNum; i++) {// 页

		Sheet sheet = workbook.getSheetAt(0);

		List<Map<String, String>> sheetData = new ArrayList<Map<String, String>>();

		int rsRows = sheet.getPhysicalNumberOfRows(); // 获得此页总行数

		for (int j = 2; j < rsRows; j++) {// 行

			Row row = sheet.getRow(j);
			Map<String, String> rowMap = new HashMap<String, String>();

			Cell ProjectName = row.getCell(1); // ProjectName
			if (ProjectName != null) {// ProjectName
				rowMap.put("projectName", ProjectName.getRichStringCellValue().toString().replace(" ", ""));
			}
			Cell JobNo = row.getCell(2); // jobNo 项目工作号
			if (JobNo != null) {// jobNo 项目工作号
				rowMap.put("jobNo", JobNo.getRichStringCellValue().toString().replace(" ", ""));
			}
			Cell ModuleName = row.getCell(3); // ModuleName模块名称
			if (ModuleName != null) {// ModuleName模块名称
				rowMap.put("moduleName", ModuleName.getRichStringCellValue().toString().replace(" ", ""));
			}

			Cell WorkPackageNo = row.getCell(4); // 模块工作包号
			if (WorkPackageNo != null) {// 模块工作包号
				if (!WorkPackageNo.getRichStringCellValue().toString().equals("NA"))
					rowMap.put("workPackageNo", WorkPackageNo.getRichStringCellValue().toString());
			}
			Cell LineNo = row.getCell(6); // Line No. 管线号
			if (LineNo != null) {// . 管线号
				LineNo.setCellType(CellType.STRING);
				rowMap.put("lineNo", LineNo.getRichStringCellValue().toString());
			}
			Cell ShopDrawingNo = row.getCell(9); // 图纸编码
			if (ShopDrawingNo != null) {// 图纸编码
				ShopDrawingNo.setCellType(CellType.STRING);
				if (!ShopDrawingNo.getRichStringCellValue().toString().toUpperCase().equals("NA")
						&& !ShopDrawingNo.getRichStringCellValue().toString().equals("")) {
					rowMap.put("shopDrawingNo", ShopDrawingNo.getRichStringCellValue().toString().replace(" ", ""));
				}
			}
			Cell ShopDrawingRev = row.getCell(12); // 图纸版本
			if (ShopDrawingRev != null) {// 图纸版本
				ShopDrawingRev.setCellType(CellType.STRING);
				rowMap.put("shopDrawingRev", ShopDrawingRev.getRichStringCellValue().toString());
			}

			Cell assemblyFabricationDetailNo = row.getCell(15); // Spool No. 管段号
			if (assemblyFabricationDetailNo != null) {
				assemblyFabricationDetailNo.setCellType(CellType.STRING);
				if (!assemblyFabricationDetailNo.getRichStringCellValue().toString().toUpperCase().equals("NA")
						&& !assemblyFabricationDetailNo.getRichStringCellValue().toString().equals("")) {
					rowMap.put("FabricationNo",
							assemblyFabricationDetailNo.getRichStringCellValue().toString().replace(" ", ""));
				}
			}

			Cell partName = row.getCell(16); // 零件名称
			if (partName != null) {// 零件名称
				partName.setCellType(CellType.STRING);
				if (!partName.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("partName", partName.getRichStringCellValue().toString().replace(" ", ""));
				}
			}

			Cell standard = row.getCell(17); // 执行标准
			if (standard != null) {// 执行标准
				standard.setCellType(CellType.STRING);
				if (!standard.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("standard", standard.getRichStringCellValue().toString().replace(" ", ""));
				}
			}
			Cell partType = row.getCell(18); // 零件类型
			if (partType != null) {// 零件类型
				partType.setCellType(CellType.STRING);
				if (!partType.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("partType", partType.getRichStringCellValue().toString().toUpperCase());
				}
			}

			Cell partNo = row.getCell(19); // 零件编码
			if (partNo != null) {// 零件编码
				if (!partNo.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("partNo", partNo.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell identCode = row.getCell(21); // 识别码
			if (identCode != null) {// 识别码
				identCode.setCellType(CellType.STRING);
				if (!identCode.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("identCode", identCode.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell materialCodecell = row.getCell(22);
			if (materialCodecell != null) {// 物料编码18位
				rowMap.put("materialCode", materialCodecell.getRichStringCellValue().toString());
			}
			Cell materialCodecell2 = row.getCell(23);
			if (materialCodecell != null) {// 物料编码16位
				rowMap.put("materialCode2", materialCodecell2.getRichStringCellValue().toString());
			}

			Cell tagNo = row.getCell(24); // 位号
			if (tagNo != null) {// 识别码
				tagNo.setCellType(CellType.STRING);
				if (!tagNo.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("tagNo", tagNo.getRichStringCellValue().toString().toUpperCase());
				}
			}

			Cell partProfile = row.getCell(24); // 零件规格
			if (partProfile != null) {// 零件规格
				partProfile.setCellType(CellType.STRING);
				rowMap.put("partProfile", partProfile.getRichStringCellValue().toString().toUpperCase());
			}
			Cell partMainSize = row.getCell(25); // 零件主尺寸
			if (partMainSize != null) {// 识别码
				partMainSize.setCellType(CellType.STRING);
				if (!partMainSize.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("partMainSize", partMainSize.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell part2ndSize = row.getCell(26); // Part 2nd Size 零件副尺寸
			if (part2ndSize != null) {// 零件副尺寸
				part2ndSize.setCellType(CellType.STRING);
				if (!part2ndSize.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("part2ndSize", part2ndSize.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell pressureClass = row.getCell(27); // Pressure Class 压力级别
			if (pressureClass != null) {// 压力级别
				pressureClass.setCellType(CellType.STRING);
				if (!pressureClass.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("pressureClass", pressureClass.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell mainThicknessGrade = row.getCell(28); // Main Thickness Grade 主壁厚级别
			if (mainThicknessGrade != null) {// 主壁厚级别
				mainThicknessGrade.setCellType(CellType.STRING);
				if (!mainThicknessGrade.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("mainThicknessGrade",
							mainThicknessGrade.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell ThicknessGrade2nd = row.getCell(29); // 2ndThicknessGrade
			if (ThicknessGrade2nd != null) {// 次壁厚级别
				ThicknessGrade2nd.setCellType(CellType.STRING);
				if (!ThicknessGrade2nd.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("2ndThicknessGrade",
							ThicknessGrade2nd.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell mainConnectionType = row.getCell(30); // Main Connection Type 主连接形式
			if (mainConnectionType != null) {
				mainConnectionType.setCellType(CellType.STRING);
				if (!mainConnectionType.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("mainConnectionType",
							mainConnectionType.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell connectionType2nd = row.getCell(31); // 2nd Connection Type 次连接形式
			if (connectionType2nd != null) {
				connectionType2nd.setCellType(CellType.STRING);
				if (!connectionType2nd.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("connectionType2nd",
							connectionType2nd.getRichStringCellValue().toString().toUpperCase().replace(" ", ""));
				}
			}

			Cell specialRequirement = row.getCell(33); // Special Requirement 特殊要求
			if (specialRequirement != null) {
				specialRequirement.setCellType(CellType.STRING);
				if (!specialRequirement.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("specialRequirement",
							specialRequirement.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell partLocation = row.getCell(34); // Part Location 零件位置
			if (partLocation != null) {
				partLocation.setCellType(CellType.STRING);
				if (!partLocation.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("partLocation", partLocation.getRichStringCellValue().toString().toUpperCase());
				}
			}

			Cell materialLongDescription = row.getCell(35); // Material Long Description 材料长描述
			if (materialLongDescription != null) {
				materialLongDescription.setCellType(CellType.STRING);
				if (!materialLongDescription.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("materialLongDescription",
							materialLongDescription.getRichStringCellValue().toString().toUpperCase());
				}
			}

			Cell materialType = row.getCell(36); // Material Type 材料类别
			if (materialType != null) {
				materialType.setCellType(CellType.STRING);
				if (!materialType.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("materialType", materialType.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell qty = row.getCell(37); // Qty. 数量
			if (qty != null) {
				qty.setCellType(CellType.STRING);
				if (!qty.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("qty", qty.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell unitCell = row.getCell(38); // 计量单位
			if (unitCell != null) {// 计量单位
				unitCell.setCellType(CellType.STRING);
				rowMap.put("unit", unitCell.getRichStringCellValue().toString().toUpperCase());
			}
			Cell netLength = row.getCell(39); // Net Length (mm) 净长度
			if (netLength != null) {
				netLength.setCellType(CellType.STRING);
				if (!netLength.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("netLength", netLength.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell additionalLength = row.getCell(40); // Additional Length (mm) 余量
			if (additionalLength != null) {
				additionalLength.setCellType(CellType.STRING);
				if (!additionalLength.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("additionalLength", additionalLength.getRichStringCellValue().toString().toUpperCase());
				}
			}

			Cell finalLength = row.getCell(41); // Final Length (mm) 总长度
			if (finalLength != null) {
				finalLength.setCellType(CellType.STRING);
				if (!finalLength.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("finalLength", finalLength.getRichStringCellValue().toString().toUpperCase());
				}
			}

			Cell materialRequisitionFormNo = row.getCell(42); // Material Requisition Form No 施工领料单编号
			if (materialRequisitionFormNo != null) {
				materialRequisitionFormNo.setCellType(CellType.STRING);
				if (!materialRequisitionFormNo.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("materialRequisitionFormNo",
							materialRequisitionFormNo.getRichStringCellValue().toString().toUpperCase());
				}
			}

			Cell NestingDrawingNo = row.getCell(43); // 套料图纸编号
			if (NestingDrawingNo != null && !NestingDrawingNo.toString().equals("NA")) {// 套料图纸编号
				NestingDrawingNo.setCellType(CellType.STRING);
				rowMap.put("nestingDrawingNo", NestingDrawingNo.getRichStringCellValue().toString());
			}
			Cell NestingDrawingRev = row.getCell(44); // 套料图纸版本
			NestingDrawingRev.setCellType(CellType.STRING);
			if (NestingDrawingNo != null && !NestingDrawingNo.toString().equals("NA")) {// 套料图纸版本
				rowMap.put("nestingDrawingRev", NestingDrawingRev.getRichStringCellValue().toString());
			}

			Cell remnantPartNo = row.getCell(46); // 余料编码
			if (remnantPartNo != null) {// 余料编码
				remnantPartNo.setCellType(CellType.STRING);
				if (!remnantPartNo.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("remnantPartNo", remnantPartNo.getRichStringCellValue().toString().toUpperCase());
				}
			}

			Cell unitNetWeight = row.getCell(50); // Unit Net Weight (kg/m, kg/-) 单位净重
			if (unitNetWeight != null) {
				unitNetWeight.setCellType(CellType.STRING);
				if (!unitNetWeight.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("unitNetWeight", unitNetWeight.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell netWeight = row.getCell(51); // Net Weight (kg) 净重
			if (netWeight != null) {
				netWeight.setCellType(CellType.STRING);
				if (!netWeight.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("netWeight", netWeight.getRichStringCellValue().toString().toUpperCase());
				}
			}

			Cell coatingSystem = row.getCell(52); // Coating System 油漆配套
			if (coatingSystem != null) {
				coatingSystem.setCellType(CellType.STRING);
				if (!coatingSystem.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("coatingSystem", coatingSystem.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell coatingColor = row.getCell(53); // Coating Color 油漆颜色
			if (coatingColor != null) {
				coatingColor.setCellType(CellType.STRING);
				if (!coatingColor.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("coatingColor", coatingColor.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell unitCetArea = row.getCell(54); // Unit Net Area(m2) 单位净表面积
			if (unitCetArea != null) {
				unitCetArea.setCellType(CellType.STRING);
				if (!unitCetArea.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("unitCetArea", unitCetArea.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell netArea = row.getCell(55); // Net Area(m2) 净表面积
			if (netArea != null) {
				netArea.setCellType(CellType.STRING);
				if (!netArea.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("netArea", netArea.getRichStringCellValue().toString().toUpperCase());
				}
			}

			Cell insulationCode = row.getCell(56); // Insulation Code 保温类型
			if (insulationCode != null) {
				insulationCode.setCellType(CellType.STRING);
				if (!insulationCode.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("insulationCode", insulationCode.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell insulationTHK = row.getCell(57); // Insulation THK (mm) 保温厚度
			if (insulationTHK != null) {
				insulationTHK.setCellType(CellType.STRING);
				if (!insulationTHK.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("insulationTHK", insulationTHK.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell insultationSurfaceArea = row.getCell(58); // Insultation Surface Area(m2) 保温表面积
			if (insultationSurfaceArea != null) {
				insultationSurfaceArea.setCellType(CellType.STRING);
				if (!insultationSurfaceArea.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("insultationSurfaceArea",
							insultationSurfaceArea.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell insultationEquivalentLength = row.getCell(59); // Insultation Equivalent Length(ELM) 保温延米
			if (insultationEquivalentLength != null) {
				insultationEquivalentLength.setCellType(CellType.STRING);
				if (!insultationEquivalentLength.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("insultationEquivalentLength",
							insultationEquivalentLength.getRichStringCellValue().toString().toUpperCase());
				}
			}

			Cell MTONo = row.getCell(61); // MTO No 料单编号
			if (MTONo != null) {
				MTONo.setCellType(CellType.STRING);
				if (!MTONo.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("MTONo", MTONo.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell itemNoinMTO = row.getCell(62); // Item No. in MTO 料单中序号
			if (itemNoinMTO != null) {
				itemNoinMTO.setCellType(CellType.STRING);
				if (!itemNoinMTO.getRichStringCellValue().toString().equals("NA")) {
					rowMap.put("itemNoinMTO", itemNoinMTO.getRichStringCellValue().toString().toUpperCase());
				}
			}
			Cell gradeCell = row.getCell(69);
			if (gradeCell != null) {// 材质
				rowMap.put("grade", gradeCell.getRichStringCellValue().toString());
			}

			sheetData.add(rowMap);
		}

		sheetList.add(sheetData);
		// }
		// 文件流关闭
		fileInputStream.close();
		return sheetList;
	}

	/**
	 * 解析管线专业焊口信息
	 * 
	 * @param path
	 * @return
	 * @throws IOException
	 */
	public List<Map<String, String>> AnalyzeWeldersListforStructureExcelPI(String path) throws IOException {

		// 获取文件流
		FileInputStream fileInputStream = new FileInputStream(path);

		// 1.从流中获取工作簿
		@SuppressWarnings("resource")
		Workbook workbook = new XSSFWorkbook(fileInputStream);

		// int sheetNum = workbook.getNumberOfSheets();

		List<List<Map<String, String>>> sheetList = new ArrayList<List<Map<String, String>>>();

		// for (int i = 0; i < sheetNum; i++) {// 页
		Sheet sheet = workbook.getSheetAt(0);

		List<Map<String, String>> sheetData = new ArrayList<Map<String, String>>();

		int rsRows = sheet.getPhysicalNumberOfRows(); // 获得此页总行数

		for (int j = 2; j < rsRows; j++) {// 行
			System.err.println("正在读取中" + j);
			Row row = sheet.getRow(j);
			Map<String, String> rowMap = new HashMap<String, String>();

			Cell projectNo = row.getCell(1); // Project No 项目ID
			if (projectNo != null) {// Project No
				projectNo.setCellType(CellType.STRING);
				rowMap.put("projectNo", projectNo.getRichStringCellValue().toString().toUpperCase());
			}

			Cell projectName = row.getCell(2); // Project Name 项目名称
			if (projectName != null) {// Project Name
				projectName.setCellType(CellType.STRING);
				rowMap.put("projectName", projectName.getRichStringCellValue().toString().toUpperCase());
			}

			Cell ModuleNo = row.getCell(3); // Module No 模块编号
			if (ModuleNo != null) {// Project Name
				ModuleNo.setCellType(CellType.STRING);
				rowMap.put("moduleNo", ModuleNo.getRichStringCellValue().toString().toUpperCase());
			}
			Cell drawingNo = row.getCell(4); // 图纸
			if (drawingNo != null) {// 图纸
				drawingNo.setCellType(CellType.STRING);
				rowMap.put("drawingNo", drawingNo.getRichStringCellValue().toString().toUpperCase());
			}
			Cell drawingRev = row.getCell(5); // DrawingRev图纸版本
			if (drawingRev != null) {// DrawingRev图纸版本
				drawingRev.setCellType(CellType.STRING);
				rowMap.put("drawingRev", drawingRev.getRichStringCellValue().toString().toUpperCase());
			}
			Cell assemblyNo = row.getCell(6); // AssemblyNo 构件编号
			if (assemblyNo != null) {// AssemblyNo 构件图纸编号
				assemblyNo.setCellType(CellType.STRING);
				rowMap.put("assemblyNo", assemblyNo.getRichStringCellValue().toString().toUpperCase());
			}
			rowMap.put("assembly_Drawing_No",
					rowMap.get("drawingNo") + "-" + rowMap.get("drawingRev") + "-" + rowMap.get("assemblyNo"));

			Cell systemCode = row.getCell(7); // systemCode 系统代码
			if (systemCode != null) {// systemCode 系统代码
				systemCode.setCellType(CellType.STRING);
				rowMap.put("systemCode", systemCode.getRichStringCellValue().toString().toUpperCase());
			}
			Cell pipeClass = row.getCell(8); // pipeClass 管线等级
			if (pipeClass != null) {// pipeClass 管线等级
				pipeClass.setCellType(CellType.STRING);
				rowMap.put("pipeClass", pipeClass.getRichStringCellValue().toString().toUpperCase());
			}
			Cell size = row.getCell(9); // size
			if (size != null) {// Size 寸劲
				size.setCellType(CellType.STRING);
				rowMap.put("size", size.getRichStringCellValue().toString().toUpperCase());
			}
			Cell jointNo = row.getCell(10); // jointNo 管线等级
			if (jointNo != null) {//
				jointNo.setCellType(CellType.STRING);
				rowMap.put("jointNo", jointNo.getRichStringCellValue().toString().toUpperCase());
			}
			Cell weldCatelogory = row.getCell(11);
			if (weldCatelogory != null) {// 焊口种类
				weldCatelogory.setCellType(CellType.STRING);
				rowMap.put("weldCatelogory", weldCatelogory.getRichStringCellValue().toString().toUpperCase());
			}
			Cell jointType = row.getCell(12);
			if (jointType != null) {// 焊口形式
				jointType.setCellType(CellType.STRING);
				rowMap.put("jointType", jointType.getRichStringCellValue().toString().toUpperCase());
			}
			Cell diaInch = row.getCell(13);
			if (diaInch != null) {// 焊口直径
				diaInch.setCellType(CellType.STRING);
				rowMap.put("diaInch", diaInch.getRichStringCellValue().toString().toUpperCase());
			}

			Cell part1Name = row.getCell(14);
			if (part1Name != null) {// 组成焊口的第一部分材料
				part1Name.setCellType(CellType.STRING);
				rowMap.put("part1Name", part1Name.getRichStringCellValue().toString().toUpperCase());
			}

			Cell part1MTO_ORD_ID = row.getCell(15);
			if (part1MTO_ORD_ID != null) {// 识别编码
				part1MTO_ORD_ID.setCellType(CellType.STRING);
				rowMap.put("part1MTO_ORD_ID", part1MTO_ORD_ID.getRichStringCellValue().toString().toUpperCase());
			}
			Cell part1Description = row.getCell(16);
			if (part1Description != null) {// 材料描述
				part1Description.setCellType(CellType.STRING);
				rowMap.put("part1Description", part1Description.getRichStringCellValue().toString().toUpperCase());
			}
			Cell part2Name = row.getCell(17);
			if (part2Name != null) {// 组成焊口的第二部分材料
				part2Name.setCellType(CellType.STRING);
				rowMap.put("part2Name", part2Name.getRichStringCellValue().toString().toUpperCase());
			}
			Cell part2MTO_ORD_ID = row.getCell(18);
			if (part2MTO_ORD_ID != null) {// 组成焊口的第二部分材料 识别编码
				part2MTO_ORD_ID.setCellType(CellType.STRING);
				rowMap.put("part2MTO_ORD_ID", part2MTO_ORD_ID.getRichStringCellValue().toString().toUpperCase());
			}
			Cell part2Description = row.getCell(19);
			if (part2Description != null) {// 组成焊口的第二部分材料 材料描述
				part2Description.setCellType(CellType.STRING);
				rowMap.put("part2Description", part2Description.getRichStringCellValue().toString().toUpperCase());
			}
			Cell part1 = row.getCell(20);
			if (part1 != null) {// 壁厚等级 PART 1
				part1.setCellType(CellType.STRING);
				rowMap.put("part1", part1.getRichStringCellValue().toString().toUpperCase());
			}
			Cell part2 = row.getCell(21);
			if (part2 != null) {// 壁厚等级 PART 1
				part2.setCellType(CellType.STRING);
				rowMap.put("part2", part2.getRichStringCellValue().toString().toUpperCase());
			}
			Cell grade = row.getCell(22);
			if (grade != null) {// 材质
				grade.setCellType(CellType.STRING);
				rowMap.put("grade", grade.getRichStringCellValue().toString().toUpperCase());
			}
			Cell finallyWallthickness = row.getCell(23);
			if (finallyWallthickness != null) {// 最终壁厚
				finallyWallthickness.setCellType(CellType.STRING);
				rowMap.put("finallyWallthickness",
						finallyWallthickness.getRichStringCellValue().toString().toUpperCase());
			}
			Cell Remark = row.getCell(24);
			if (Remark != null) {// 备注
				Remark.setCellType(CellType.STRING);
				rowMap.put("remark", Remark.getRichStringCellValue().toString().toUpperCase());
			}
			sheetData.add(rowMap);
		}

		return sheetData;

	}

	/**
	 * 管线专业 试压包 spool excel数据读取
	 * 
	 * @param path
	 * @return
	 * @throws IOException
	 */
	public List<Map<String, String>> AnalyzePressurePackagePI(String path) throws IOException {
		FileInputStream fileInputStream = new FileInputStream(path);
		// 1.从流中获取工作簿
		@SuppressWarnings("resource")
		Workbook workbook = new XSSFWorkbook(fileInputStream);
		Sheet sheet = workbook.getSheetAt(0);
		List<Map<String, String>> sheetData = new ArrayList<Map<String, String>>();
		int rsRows = sheet.getPhysicalNumberOfRows(); // 获得此页总行数
		for (int j = 2; j < rsRows; j++) {// 行
			Row row = sheet.getRow(j);
			Map<String, String> rowMap = new HashMap<String, String>();
			// 读取信息

			try {
				Cell projectName = row.getCell(0); // ProjectName 项目名称
				if (projectName != null) {
					projectName.setCellType(CellType.STRING);
					rowMap.put("projectName", projectName.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 项目名称错误");
			}
			try {
				Cell jobNo = row.getCell(1); // 项目号
				if (jobNo != null) {
					jobNo.setCellType(CellType.STRING);
					rowMap.put("jobNo", jobNo.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 项目号错误");
			}

			try {
				Cell moudleNo = row.getCell(2); // 模块号
				if (moudleNo != null) {
					moudleNo.setCellType(CellType.STRING);
					rowMap.put("moduleName", moudleNo.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 模块号错误");
			}

			try {
				Cell testPackNo = row.getCell(3); // Test Pack No.试压包号
				if (testPackNo != null) {
					testPackNo.setCellType(CellType.STRING);
					rowMap.put("testPackNo", testPackNo.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 试压包号");
			}
			Cell systemNo = row.getCell(4);
			try {

				if (systemNo != null) {// System No. 系统号
					systemNo.setCellType(CellType.STRING);
					rowMap.put("systemNo", systemNo.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 系统号");
			}

			try {
				Cell subSystemNo = row.getCell(5); // Sub-System No. 子系统号
				if (subSystemNo != null) {
					subSystemNo.setCellType(CellType.STRING);
					rowMap.put("subSystemNo", subSystemNo.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 子系统号");
			}

			try {
				Cell fluidCode = row.getCell(6); // Fluid Code 系统代码
				if (fluidCode != null) {
					fluidCode.setCellType(CellType.STRING);
					rowMap.put("fluidCode", fluidCode.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 系统代码");
			}

			try {
				Cell pIdNo = row.getCell(7); // P&ID No. P&ID号
				if (pIdNo != null) {
					pIdNo.setCellType(CellType.STRING);
					rowMap.put("pIdNo", pIdNo.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 P&ID号");
			}

			try {
				Cell pIdNoRev = row.getCell(8); // P&ID REV. P&ID版本
				if (pIdNoRev != null) {
					pIdNoRev.setCellType(CellType.STRING);
					rowMap.put("pIdNoRev", pIdNoRev.getRichStringCellValue().toString().replace(" ", ""));
				}

			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 P&ID版本");
			}

			try {
				Cell pIdLineNo = row.getCell(9); // P&ID Line No. P&ID管线号
				if (pIdLineNo != null) {
					pIdLineNo.setCellType(CellType.STRING);
					rowMap.put("pIdLineNo", pIdLineNo.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "ISO 图号");
			}

			try {
				Cell ISONo = row.getCell(10); // ISO No. ISO 图号
				if (ISONo != null) {
					ISONo.setCellType(CellType.STRING);
					rowMap.put("ISONo", ISONo.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "ISO 图号");
			}

			try {
				Cell ISOLastRev = row.getCell(11); // ISO Last Rev. ISO 最新版本
				if (ISOLastRev != null) {//
					ISOLastRev.setCellType(CellType.STRING);
					rowMap.put("ISOLastRev", ISOLastRev.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 ISO 最新版本");
			}
			try {
				Cell spoolNo = row.getCell(12); // Spool No. 管段号
				if (spoolNo != null) {// 位置
					spoolNo.setCellType(CellType.STRING);
					rowMap.put("spoolNo", spoolNo.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 管段号");
			}

			try {
				Cell spoolLastRev = row.getCell(13); // Spool Last Rev 管段最新版本
				if (spoolLastRev != null) {// 管段最新版本
					spoolLastRev.setCellType(CellType.STRING);
					rowMap.put("spoolLastRev", spoolLastRev.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 管段最新版本");
			}

			try {
				Cell spoolDia = row.getCell(14); // Spool DIA 管段尺寸 (Inch)
				if (spoolDia != null) {// 宽度
					spoolDia.setCellType(CellType.STRING);
					rowMap.put("spoolDia", spoolDia.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 管段尺寸 	(Inch)");
			}

			try {

				Cell pipingMateiralClass = row.getCell(15); // Piping Mateiral Class 管线材料等级
				if (pipingMateiralClass != null) {// 高度
					pipingMateiralClass.setCellType(CellType.STRING);
					rowMap.put("pipingMateiralClass", pipingMateiralClass.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 管线材料等级");
			}

			try {

				Cell pipingMateiral = row.getCell(16); // Piping Mateiral 管线材料
				if (pipingMateiral != null) {// 高度
					pipingMateiral.setCellType(CellType.STRING);
					rowMap.put("pipingMateiral", pipingMateiral.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 管线材料");
			}

			try {

				Cell designPressure = row.getCell(17); // Design Pressure (kPa) 设计压力（kPa）
				if (designPressure != null) {//
					designPressure.setCellType(CellType.STRING);
					rowMap.put("designPressure", designPressure.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 设计压力（kPa）");
			}

			try {

				Cell operationPressure = row.getCell(18); // Operation Pressure (kPa) 操作压力(kPa)
				if (operationPressure != null) {// 操作压力(kPa)
					operationPressure.setCellType(CellType.STRING);
					rowMap.put("operationPressure", operationPressure.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 操作压力(kPa)");
			}

			try {
				Cell testPressure = row.getCell(19); // Test Pressure (kPa) 测试压力(kPa)
				if (testPressure != null) {
					testPressure.setCellType(CellType.STRING);
					rowMap.put("testPressure", testPressure.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 测试压力(kPa)");
			}

			try {
				Cell testMedium = row.getCell(20); // Test Medium 试压介质
				if (testMedium != null) {
					testMedium.setCellType(CellType.STRING);
					rowMap.put("testMedium", testMedium.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 试压介质");
			}

			try {

				Cell holdingTime = row.getCell(21); // Holding Time(min) 稳压时间（分钟）
				if (holdingTime != null) {
					holdingTime.setCellType(CellType.STRING);
					rowMap.put("holdingTime", holdingTime.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 稳压时间（分钟）");
			}

			try {

				Cell spoolVolume = row.getCell(22); // Spool Volume （m³） 管段体积
				if (spoolVolume != null) {
					spoolVolume.setCellType(CellType.STRING);
					rowMap.put("spoolVolume", spoolVolume.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 管段体积");
			}

			try {

				Cell testPackageHSIORITY = row.getCell(23); // Test Package HSIORITY 试压优先级别
				if (testPackageHSIORITY != null) {
					testPackageHSIORITY.setCellType(CellType.STRING);
					rowMap.put("testPackageHSIORITY", testPackageHSIORITY.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 	试压优先级别");
			}
			sheetData.add(rowMap);
		}
		// 文件流关闭
		fileInputStream.close();
		return sheetData;
	}

	@SuppressWarnings("deprecation")
	@Override
	/**
	 * 机械设备专业
	 */
	public List<List<Map<String, String>>> AnalyzeExcelMA(String path) throws FileNotFoundException, IOException {
		// 获取文件流
		FileInputStream fileInputStream = new FileInputStream(path);

		// 1.从流中获取工作簿
		@SuppressWarnings("resource")
		Workbook workbook = new XSSFWorkbook(fileInputStream);

		List<List<Map<String, String>>> sheetList = new ArrayList<List<Map<String, String>>>();

		Sheet sheet = workbook.getSheetAt(0);

		List<Map<String, String>> sheetData = new ArrayList<Map<String, String>>();

		int rsRows = sheet.getPhysicalNumberOfRows(); // 获得此页总行数
		System.err.println(rsRows);

		for (int j = 3; j < rsRows; j++) {// 行

			Row row = sheet.getRow(j);
			Map<String, String> rowMap = new HashMap<String, String>();
			// 读取信息

			try {
				Cell jobNo = row.getCell(0); // 项目号
				if (jobNo != null) {
					jobNo.setCellType(CellType.STRING);
					rowMap.put("jobNo", jobNo.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 项目号错误");
			}

			try {
				Cell moudleNo = row.getCell(1); // 模块号
				if (moudleNo != null) {
					moudleNo.setCellType(CellType.STRING);
					rowMap.put("moduleName", moudleNo.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 模块号错误");
			}

			try {
				Cell Discipline = row.getCell(2); // 专业
				if (Discipline != null) {
					Discipline.setCellType(CellType.STRING);
					rowMap.put("Discipline", Discipline.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 专业错误");
			}
			Cell tagNo = row.getCell(3); // 设备代码
			try {

				if (tagNo != null) {// 设备代码
					tagNo.setCellType(CellType.STRING);
					rowMap.put("tagNo", tagNo.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 设备代码错误");
			}

			try {
				Cell equipmentName = row.getCell(4); // 设备名称
				if (equipmentName != null) {// 设备名称
					equipmentName.setCellType(CellType.STRING);
					rowMap.put("equipmentName", equipmentName.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 设备名称错误");
			}

			try {
				Cell EquipmentLayoutDrawingNo = row.getCell(5); // 设备布置图号
				if (EquipmentLayoutDrawingNo != null) {// 设备布置图号
					EquipmentLayoutDrawingNo.setCellType(CellType.STRING);
					rowMap.put("EquipmentLayoutDrawingNo",
							EquipmentLayoutDrawingNo.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 设备布置图号错误");
			}

			try {
				Cell EquipmentLayoutDrawingRev = row.getCell(6); // 设备布置图版本
				if (EquipmentLayoutDrawingRev != null) {// 设备布置图号版本
					EquipmentLayoutDrawingRev.setCellType(CellType.STRING);
					rowMap.put("EquipmentLayoutDrawingRev",
							EquipmentLayoutDrawingRev.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 设备布置图号错误");
			}

			try {
				Cell GADrawingNo = row.getCell(7); // GA Drawing No. 设备总 图纸号
				if (GADrawingNo != null) {// 设备总 图纸号
					GADrawingNo.setCellType(CellType.STRING);
					rowMap.put("GADrawingNo", GADrawingNo.getRichStringCellValue().toString().replace(" ", ""));
				}

			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 设备总 图纸号错误");
			}

			try {
				Cell GADrawingRev = row.getCell(8); // 设备总 图纸版本
				if (GADrawingRev != null) {// 设备总 图纸版本
					GADrawingRev.setCellType(CellType.STRING);
					String GADrawingRev2 = GADrawingRev.getRichStringCellValue().toString();
					rowMap.put("GADrawingRev", GADrawingRev2);
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行设备总图纸号版本错误");
			}

			try {
				Cell Level = row.getCell(9); // 层位
				if (Level != null) {// 层位
					Level.setCellType(CellType.STRING);
					rowMap.put("Level", Level.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 位置错误");
			}
			try {
				Cell Location = row.getCell(10); // 位置
				if (Location != null) {// 位置
					Location.setCellType(CellType.STRING);
					rowMap.put("Location", Location.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 位置错误");
			}

			try {
				Cell Length = row.getCell(11); // 长度
				if (Length != null) {// 长度
					Length.setCellType(CellType.STRING);
					rowMap.put("Length", Length.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 长度错误");
			}

			try {

				Cell Width = row.getCell(12); // 宽度
				if (Width != null) {// 宽度
					Width.setCellType(CellType.STRING);
					rowMap.put("Width", Width.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 宽度错误");
			}

			try {

				Cell Height = row.getCell(13); // 高度
				if (Height != null) {// 高度
					Height.setCellType(CellType.STRING);
					rowMap.put("Height", Height.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 高度错误");
			}

			try {

				Cell Weight = row.getCell(14); // 重量
				if (Weight != null) {// 高度
					Weight.setCellType(CellType.STRING);
					rowMap.put("Weight", Weight.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 重量错误");
			}

			try {

				Cell ExpectedArrivalDate = row.getCell(15); // 预计到货日期
				if (ExpectedArrivalDate != null) {// 预计到货日期
					ExpectedArrivalDate.setCellType(CellType.STRING);
					rowMap.put("ExpectedArrivalDate", ExpectedArrivalDate.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 预计到货日期错误");
			}

			try {

				Cell ArrivalDate = row.getCell(16); // 实际到货日期
				if (ArrivalDate != null) {// 预计到货日期
					ArrivalDate.setCellType(CellType.STRING);
					rowMap.put("ArrivalDate", ArrivalDate.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 预计到货日期错误");
			}

			try {

				Cell IssueDateOfBillOfMaterialDesign = row.getCell(17); // 料单设计下发日期
				if (IssueDateOfBillOfMaterialDesign != null) {
					IssueDateOfBillOfMaterialDesign.setCellType(CellType.STRING);
					rowMap.put("IssueDateOfBillOfMaterialDesign",
							IssueDateOfBillOfMaterialDesign.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 料单设计下发日期错误");
			}

			try {

				Cell ConnectionForm = row.getCell(18); // 连接形式
				if (ConnectionForm != null) {
					ConnectionForm.setCellType(CellType.STRING);
					rowMap.put("ConnectionForm", ConnectionForm.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 连接形式错误");
			}

			try {

				Cell InstallationMethod = row.getCell(19); // 安装方式
				if (InstallationMethod != null) {
					InstallationMethod.setCellType(CellType.STRING);
					rowMap.put("InstallationMethod", InstallationMethod.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 安装方式错误");
			}

			try {

				Cell EquipmentForm = row.getCell(20); // 设备形式
				if (EquipmentForm != null) {
					EquipmentForm.setCellType(CellType.STRING);
					rowMap.put("EquipmentForm", EquipmentForm.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 设备形式错误");
			}

			try {

				Cell ConstructionMaterialRequisitionNo = row.getCell(21); // 施工领料编号
				if (ConstructionMaterialRequisitionNo != null) {
					ConstructionMaterialRequisitionNo.setCellType(CellType.STRING);
					rowMap.put("ConstructionMaterialRequisitionNo",
							ConstructionMaterialRequisitionNo.getRichStringCellValue().toString().replace(" ", ""));
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 施工领料编号错误");
			}

			try {
				Cell PackingListNumber = row.getCell(22); // PackingListNumber 料单/箱单号
				if (PackingListNumber != null) {
					PackingListNumber.setCellType(CellType.STRING);
					rowMap.put("PackingListNumber",
							PackingListNumber.getRichStringCellValue().toString().replace(" ", ""));
				}
			} catch (Exception e) {
				System.err.println("第几行" + j + "行 施工领料编号错误");
			}

			try {
				Cell NumberOfItemsInThePackingList = row.getCell(23); // NumberOfItemsInThePackingList 料单/箱单号
				if (NumberOfItemsInThePackingList != null) {
					NumberOfItemsInThePackingList.setCellType(CellType.STRING);
					rowMap.put("NumberOfItemsInThePackingList",
							NumberOfItemsInThePackingList.getRichStringCellValue().toString().replace(" ", ""));
				}
			} catch (Exception e) {
				System.err.println("第几行" + j + "行 料单/箱单号错误");
			}

			try {

				Cell type = row.getCell(24); // 材料类型
				if (type != null) {
					type.setCellType(CellType.STRING);
					rowMap.put("type", type.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 材料描述错误");
			}

			try {

				Cell Description = row.getCell(25); // 材料描述
				if (Description != null) {
					Description.setCellType(CellType.STRING);
					rowMap.put("Description", Description.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 材料描述错误");
			}
			try {

				Cell Size = row.getCell(26); // 规格尺寸
				if (Size != null) {
					Size.setCellType(CellType.STRING);
					rowMap.put("Size", Size.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 规格尺寸错误");
			}

			try {

				Cell Material = row.getCell(27); // 材质
				if (Material != null) {
					Material.setCellType(CellType.STRING);
					rowMap.put("Material", Material.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 材质错误");
			}

			try {

				Cell Unit = row.getCell(28); // 单位
				if (Unit != null) {
					Unit.setCellType(CellType.STRING);
					rowMap.put("Unit", Unit.getRichStringCellValue().toString().toUpperCase());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 单位错误");
			}

			try {

				Cell PurchaseQty = row.getCell(29); // 采购数量
				if (PurchaseQty != null) {
					PurchaseQty.setCellType(CellType.STRING);
					rowMap.put("PurchaseQty", PurchaseQty.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 采购数量错误");
			}

			try {

				Cell materialCodecell = row.getCell(30);
				if (materialCodecell != null) {// 物料编码
					rowMap.put("materialCode", materialCodecell.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 物料编码错误");
			}

			try {

				Cell paintSystem = row.getCell(31);
				if (paintSystem != null) {// 油漆系统
					rowMap.put("paintSystem", paintSystem.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 油漆系统错误");
			}
			try {

				Cell paintType = row.getCell(32);
				if (paintType != null) {// 油漆材料类型
					rowMap.put("paintType", paintType.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 油漆材料类型错误");
			}

			try {

				Cell paintQty = row.getCell(33);
				if (paintQty != null) {// 油漆面积
					rowMap.put("paintQty", paintQty.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 油漆面积错误");
			}
			try {

				Cell fireProof = row.getCell(34);
				if (fireProof != null) {// 防火系统
					rowMap.put("fireProof", fireProof.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 防火系统错误");
			}
			try {

				Cell fireProofType = row.getCell(35);
				if (fireProofType != null) {// 防火材料类型
					rowMap.put("fireProofType", fireProofType.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 防火材料类型错误");
			}
			try {

				Cell fireProofQty = row.getCell(36);
				if (fireProofQty != null) {// 防火面积
					rowMap.put("fireProofQty", fireProofQty.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 防火面积错误");
			}

			try {

				Cell insulationSystem = row.getCell(37);
				if (insulationSystem != null) {// 保温系统
					rowMap.put("insulationSystem", insulationSystem.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 保温系统错误");
			}
			try {

				Cell insulationType = row.getCell(38);
				if (insulationType != null) {// 保温类型
					rowMap.put("insulationType", insulationType.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 保温类型错误");
			}
			try {

				Cell insulationQty = row.getCell(39);
				if (insulationQty != null) {// 保温面积
					rowMap.put("insulationQty", insulationQty.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 保温面积错误");
			}
			try {

				Cell protectionPlan = row.getCell(40);
				if (protectionPlan != null) {// 保护方案
					rowMap.put("protectionPlan", protectionPlan.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 保护方案错误");
			}

			try {

				Cell protectionMaterial = row.getCell(41);
				if (protectionMaterial != null) {// 保护材料
					rowMap.put("protectionMaterial", protectionMaterial.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 保护材料错误");
			}

			try {

				Cell protectionMaterialQty = row.getCell(42);
				if (protectionMaterialQty != null) {// 保护材料数量
					rowMap.put("protectionMaterialQty", protectionMaterialQty.getRichStringCellValue().toString());
				}
			} catch (Exception e) {
				System.err.println(path + "第几行" + j + "行 保护材料数量错误");
			}

			sheetData.add(rowMap);

		}

		sheetList.add(sheetData);

		// }

		// 文件流关闭
		fileInputStream.close();
		return sheetList;
	}

	public List<Map<String, String>> AnalyzeWeldersListforStructureExcelMA(String path) throws IOException {
		// 获取文件流
		FileInputStream fileInputStream = new FileInputStream(path);

		// 1.从流中获取工作簿
		@SuppressWarnings("resource")
		Workbook workbook = new XSSFWorkbook(fileInputStream);

		Sheet sheet = workbook.getSheetAt(0); // 获取第一页数据

		List<Map<String, String>> sheetData = new ArrayList<Map<String, String>>();

		int rsRows = sheet.getPhysicalNumberOfRows(); // 获得此页总行数

		for (int j = 2; j < rsRows; j++) {// 行
			Row row = sheet.getRow(j);
			Map<String, String> rowMap = new HashMap<String, String>();
			// 读取物料信息
			Cell projectNo = row.getCell(0); // 项目代号Project No.
			if (projectNo != null) {// 项目代号Project No.
				projectNo.setCellType(CellType.STRING);
				rowMap.put("projectNo", projectNo.getRichStringCellValue().toString().toUpperCase());
			}

			Cell projectName = row.getCell(1); // ProjectName项目名称
			if (projectName != null) {// ProjectName项目名称
				projectName.setCellType(CellType.STRING);
				rowMap.put("projectName", projectName.getRichStringCellValue().toString().toUpperCase());
			}

			Cell ModuleName = row.getCell(2); // ModuleName模块名称
			if (ModuleName != null) {// ModuleName模块名称
				ModuleName.setCellType(CellType.STRING);
				rowMap.put("ModuleName", ModuleName.getRichStringCellValue().toString().toUpperCase());
			}

			Cell equipmentStructureSupportLayoutDrawing = row.getCell(3); // 设备底座图号EquipmentStructureSupportLayoutDrawing
			if (equipmentStructureSupportLayoutDrawing != null) {// 设备底座图号EquipmentStructureSupportLayoutDrawing
				equipmentStructureSupportLayoutDrawing.setCellType(CellType.STRING);
				rowMap.put("equipmentStructureSupportLayoutDrawing",
						equipmentStructureSupportLayoutDrawing.getRichStringCellValue().toString().toUpperCase());
			}

			Cell equipmentStructureSupportLayoutDrawingRev = row.getCell(4); // 设备底座图号
																				// 版本EquipmentStructureSupportLayoutDrawingRev
			if (equipmentStructureSupportLayoutDrawingRev != null) {// 设备底座图号EquipmentStructureSupportLayoutDrawingRev
				equipmentStructureSupportLayoutDrawingRev.setCellType(CellType.STRING);
				rowMap.put("equipmentStructureSupportLayoutDrawingRev",
						equipmentStructureSupportLayoutDrawingRev.getRichStringCellValue().toString().toUpperCase());
			}

			Cell equipmentTagNo = row.getCell(5); // 设备代码EquipmentTagNo.
			if (equipmentTagNo != null) {//// 设备总图号EquipmentGADrawingNo
				equipmentTagNo.setCellType(CellType.STRING);
				rowMap.put("equipmentTagNo", equipmentTagNo.getRichStringCellValue().toString().toUpperCase());
			}

			Cell equipmentGADrawingNo = row.getCell(6); // 设备总图号EquipmentGADrawingNo
			if (equipmentGADrawingNo != null) {// 设备总图号EquipmentGADrawingNo
				equipmentGADrawingNo.setCellType(CellType.STRING);
				rowMap.put("equipmentGADrawingNo",
						equipmentGADrawingNo.getRichStringCellValue().toString().toUpperCase() + "-"
								+ equipmentTagNo.getRichStringCellValue().toString().toUpperCase());
			}

			Cell equipmentGADrawingNoRev = row.getCell(7); // 设备总图号EquipmentGADrawingNoRev
			if (equipmentGADrawingNoRev != null) {// 设备总图号EquipmentGADrawingNoRev
				equipmentGADrawingNoRev.setCellType(CellType.STRING);
				rowMap.put("equipmentGADrawingNoRev",
						equipmentGADrawingNoRev.getRichStringCellValue().toString().toUpperCase());
			}

			Cell weldingNo = row.getCell(8); // Welding No焊接编号
			if (weldingNo != null) {// Welding No焊接编号
				weldingNo.setCellType(CellType.STRING);
				rowMap.put("weldingNo", weldingNo.getRichStringCellValue().toString().toUpperCase());
			}

			Cell weldQTY = row.getCell(9); // WeldQTY焊缝数量
			if (weldQTY != null) {// WeldQTY焊缝数量
				weldQTY.setCellType(CellType.STRING);
				rowMap.put("weldQTY", weldQTY.getRichStringCellValue().toString().toUpperCase());
			}

			Cell weldLength = row.getCell(10); // WeldLength焊缝长度（mm）
			if (weldLength != null) {// WeldLength焊缝长度（mm）
				weldLength.setCellType(CellType.STRING);
				rowMap.put("weldLength", weldLength.getRichStringCellValue().toString().toUpperCase());
			}

			Cell wedingType = row.getCell(11); // 焊接类型 Weding Type
			if (wedingType != null) {// 焊接类型 Weding Type
				wedingType.setCellType(CellType.STRING);
				rowMap.put("wedingType", wedingType.getRichStringCellValue().toString().toUpperCase());
			}

			Cell postWeldTreatment = row.getCell(12); // 焊后处理Post Weld Treatment
			if (postWeldTreatment != null) {// 焊后处理Post Weld Treatment
				postWeldTreatment.setCellType(CellType.STRING);
				rowMap.put("postWeldTreatment", postWeldTreatment.getRichStringCellValue().toString().toUpperCase());
			}

			Cell structureSupportMaterial = row.getCell(13); // 底座材质材质Structure Support Material
			if (structureSupportMaterial != null) {// 底座材质材质Structure Support Material
				structureSupportMaterial.setCellType(CellType.STRING);
				rowMap.put("structureSupportMaterial",
						structureSupportMaterial.getRichStringCellValue().toString().toUpperCase());
			}

			sheetData.add(rowMap);
		}

		return sheetData;

	}

}
